package org.zhouhe.modules.website;

import org.springframework.beans.factory.annotation.Autowired;
import org.zhouhe.base.BaseAction;
import org.zhouhe.modules.hotproject.service.HotProjectService;
import org.zhouhe.page.PageUtil;
import org.zhouhe.vo.HotProject;
import org.zhouhe.vo.Industry;
import org.zhouhe.vo.Investment;
import org.zhouhe.vo.Region;

public class HotProjectAction extends BaseAction {

	private static final long serialVersionUID = 896164905733014622L;
	private PageUtil pageUtil;
	private String pageTitle;
	private Region region = new Region();
	private Industry projectIndustry = new Industry();
	private Investment investment = new Investment();
	private HotProject hotProject = new HotProject();
	@Autowired
	private HotProjectService hotProjectService;

	public String list() {
		this.setPageTitle("热点项目");
		pageUtil = hotProjectService.getHotProjectList(pageUtil, hotProject, getRegion().getRegionId(), projectIndustry.getIndustryId(), investment.getInvestmentId());
		return "list";
	}

	public String detail() {
		hotProject = hotProjectService.getHotProjectDetail(hotProject);
		this.setPageTitle(hotProject.getTitle() +" - 热点项目");
		return "detail";
	}

	public PageUtil getPageUtil() {
		return pageUtil;
	}

	public void setPageUtil(PageUtil pageUtil) {
		this.pageUtil = pageUtil;
	}

	public String getPageTitle() {
		return pageTitle;
	}

	public void setPageTitle(String pageTitle) {
		this.pageTitle = pageTitle;
	}

	public void setHotProject(HotProject hotProject) {
		this.hotProject = hotProject;
	}

	public HotProject getHotProject() {
		return hotProject;
	}

	public void setProjectIndustry(Industry industry) {
		this.projectIndustry = industry;
	}

	public Industry getProjectIndustry() {
		return projectIndustry;
	}

	public void setInvestment(Investment investment) {
		this.investment = investment;
	}

	public Investment getInvestment() {
		return investment;
	}

	public void setRegion(Region region) {
		this.region = region;
	}

	public Region getRegion() {
		return region;
	}
}
